package com.etc;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

//1)@Component    @Repository   3)@Service   4)：@Controller
@Service
public class B {


    @Autowired
    private  A a;

    public void eat(){
        System.out.println( a.hello() );
    }


}
